www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\admincp\D_chk_edit_acticle.asp
<% '************************************************************** ' 新动软网站管理系统 ' 官方网站: http://www.aspcpu.com ' 系统作者: 阮丁远(网名:天下程序) ' Copyright 新动软网站管理系统 版权所有 '************************************************************** %> <LINK href="../css.css" type=text/css rel=stylesheet> <% dir_set="../../" %> <!--#include file=../../inc/conn.asp--> <!--#include file=../../inc/Functionb.asp--> <!--#include file=../../inc/ajaxLIB.asp--> <!--#include file=../inc/checkadmin2.asp--> <!--#include file=../../inc/functionFiless.asp--> <!--#include file=inc_lanmu_bl.asp--> <% AJAXshowLoader() %> <% biao="[ND_prod_class]" biao2="[ND_prod]" sys_content_type=trim(request("sys_content_type")) set rs44g=server.CreateObject("adodb.recordset") rs44g.open "select * from ND_channel where sys_content_type_name='"&sys_content_type&"' and lanmu_type='"&lanmu_taba&"'",conn,1,1 if find_dataw(lanmu_taba,rs44g("id"),2)<>"1" and qx_if_max=0 then response.redirect "../D_suodinguser.asp" end if Function ChkNumeric(CHECK_ID) IF CHECK_ID = "1" or CHECK_ID =1 Then ChkNumeric = "1" Else ChkNumeric = "0" End If if CHECK_ID ="" then ChkNumeric = "0" end if End Function Function ChkFormStr(ByVal str) Dim fString fString = str If IsNull(fString) Then ChkFormStr = "" Exit Function End If fString = Replace(fString, "'", "'") fString = Replace(fString, Chr(34), """) fString = Replace(fString, Chr(13), "") fString = Replace(fString, Chr(10), "") fString = Replace(fString, Chr(9), "") fString = Replace(fString, ">", ">") fString = Replace(fString, "<", "<") fString = Replace(fString, " ", " ") ChkFormStr = fString End Function Function Formatime(ByVal datime) datime = Trim(Replace(Trim(datime), vbNewLine, "")) If Not IsDate(datime) Then Formatime = Now() Exit Function End If If Len(datime) < 11 Then Formatime = CDate(datime & " " & FormatDateTime(Now, 3)) Else Formatime = CDate(datime) End If Exit Function End Function if session(nd_admin_cach_varb_name)="" then if request.cookies(nd_admin_cach_varb_name)="" then uuuaa="" else uuuaa=request.cookies(nd_admin_cach_varb_name) end if else uuuaa=session(nd_admin_cach_varb_name) end if if sys_content_type="" then %> <script language="javascript"> alert("url参数sys_content_type不能为空"); history.go(-1); </script> <% response.end end if err1=0 if request("classid")="no" then err1=1 %> <script language="javascript"> alert("请先选择分类"); history.go(-1); </script> <% response.end end if if request("title")="" then err1=1 %> <script language="javascript"> alert("请填写产品名称"); history.go(-1); </script> <% response.end end if if request("ImageUrl")="" then err1=1 %> <script language="javascript"> alert("请选择产品小图"); history.go(-1); </script> <% response.end end if if Not IsNumeric(Request("AllHits")) then err1=1 %> <script language="javascript"> alert("初始点击数请输入整数"); history.go(-1); </script> <% response.end end if if Request("orders")="" or IsNumeric(Request("orders"))=0 then err1=1 %> <script language="javascript"> alert("产品次序必填且必须为数字"); history.go(-1); </script> <% response.end end if '================= if Request("chicj_00")="" then err1=1 %> <script language="javascript"> alert("产品市场价不能为空"); history.go(-1); </script> <% response.end end if if isnumeric(Request("chicj_00"))<>true then err1=1 %> <script language="javascript"> alert("产品市场价必须为数字"); history.go(-1); </script> <% response.end end if if Request("score")="" then score="0" else score=Request("score") end if if isnumeric(score)<>true then err1=1 %> <script language="javascript"> alert("购买一件后送的积分 必须为数字"); history.go(-1); </script> <% response.end end if if Request("numx")="" then err1=1 %> <script language="javascript"> alert("库存数量必填"); history.go(-1); </script> <% response.end end if if isnumeric(Request("numx"))<>true then err1=1 %> <script language="javascript"> alert("库存数量必须为数字"); history.go(-1); </script> <% response.end end if set rsrr=server.CreateObject("adodb.recordset") sql="select * from [ND_userGroup] where id<>1 order by clng(grades) asc" rsrr.open sql,conn,1,1 do while not rsrr.eof if Request("chicj_"&cstr(rsrr("id")))<>"" and isnumeric(Request("chicj_"&cstr(rsrr("id"))))<>true then err1=1 %> <script language="javascript"> alert("产品<%=rsrr("name")%>价必须为数字"); history.go(-1); </script> <% response.end exit do end if rsrr.movenext loop price_list="" set rsrr1=server.CreateObject("adodb.recordset") sql="select * from [ND_userGroup] where id<>1 order by clng(grades) asc" rsrr1.open sql,conn,1,1 do while not rsrr1.eof price_list=price_list&cstr(rsrr1("id"))&":"&Request("chicj_"&cstr(rsrr1("id")))&"|" rsrr1.movenext loop if price_list<>"" then price_list=left(price_list,len(price_list)-1) end if '================= if err1=0 then set rs441=server.CreateObject("adodb.recordset") rs441.open "select * from "&biao&" where id="&request("classid"),conn,1,3 if rs441("is_link_class")="1" then %> <script language="javascript"> alert("该分类为外部连接,无法添加文章"); history.go(-1); </script> <% response.end else is_new = ChkNumeric(Request.Form("is_new")) isBest = ChkNumeric(Request.Form("isBest")) isForbid = ChkNumeric(Request.Form("Forbidac")) isAccept = ChkNumeric(Request.Form("issh")) set rs44=server.CreateObject("adodb.recordset") rs44.open "select * from "&biao2&" where id="&request("id"),conn,1,3 rs44("sys_content_type")=sys_content_type rs44("title")=request("title") rs44("classid")=request("classid") rs44("SpecialID")=request("spcid") rs44("small_pic")=Request("ImageUrl") rs44("big_pic")=Request("filePath") rs44("orders")=Request("orders") rs44("content")=Request("Content") rs44("is_outlink")=Request("isoutLink") rs44("outlink")=Request("TurnLinkUrl") rs44("is_tuijian")=isBest rs44("is_new")=is_new rs44("Hits")=CLng(Request.Form("AllHits")) rs44("WriteTime")=Formatime(Trim(Request.Form("WriteTime"))) rs44("username")=uuuaa 'rs44("out_and_inner_img_list")= 'rs44("UploadImage_list")= rs44("Uploadfile_list")=Trim(Request.Form("UploadFileList")) rs44("is_shenhe")=isAccept rs44("is_can_pinlun")=isForbid rs44("is_auto_fenye")=ChkNumeric(Request.Form("AutoPages")) rs44("xiangguan_keywords_list")=ChkFormStr(Request.Form("Related")) rs44("is_show_buy")=request("isbuy") rs44("liulang_dengji_group_id")=request("liulanggroup") rs44("update_time_for_make_html")=now() '================= rs44("price1")=Request("chicj_00") rs44("price2_gradelist")=price_list rs44("xinghao")=request("xinghao") rs44("shenyu_num")=request("numx") rs44("score")=clng(score) '================= rs44.update %> <script language="javascript"> alert("修改成功"); //self.location="D_admin_acticle.asp?sys_content_type=<%=sys_content_type%>"; self.location="D_htm_edited_cont.asp?sys_content_type=<%=sys_content_type%>"; </script> <% end if end if %> <% AJAXcloseLoader() %>